#include <iostream>
#include <string>

using namespace std;

struct Person
{
	Person( string _name, Person *_pNext )
	{
		name = _name;
		pNext = pNext;
	}

	string name;
	Person *pNext;
};

void ShowNames( Person &person )
{
	Person *pPerson = &person;

	while ( pPerson )
	{
		cout << (*pPerson).name << endl;
		pPerson = pPerson->pNext;

	}
	
}

int main()
{
	//Person person0( "asd", NULL );
	//Person *pPerson1 = &person0;
	//Person **pPerson4 = &pPerson1;
	//Person ***pPerson5 = &pPerson4;
	//Person ****pPerson6 = &pPerson5;
	//Person *****pPerson7 = &pPerson6;

	////person0.
	//(**pPerson5)-> // or (***pPerson5).

	Person person1("Brent", NULL);
	Person person2("Puyih", NULL);
	Person person3("Mark", NULL);

	person1.pNext = &person2;
	person2.pNext = &person3;

	ShowNames( person1 );

}